package com.android.photoalbum.ui.adapter;


import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;


import com.android.photoalbum.ui.BaseFragment;

import java.util.ArrayList;
import java.util.List;

/**
 * 相册图片预览的adapter
 */
public class PhotoPreViewViewPagerAdapter extends FragmentStatePagerAdapter {
    private List<BaseFragment> mFragments = new ArrayList<>();

    public PhotoPreViewViewPagerAdapter(FragmentManager fm, List<BaseFragment> mFragments) {
        super(fm);
        this.mFragments = mFragments;
    }

    @Override
    public BaseFragment getItem(int position) {
        return mFragments.get(position);
    }

    @Override
    public int getCount() {
        return mFragments.size();
    }



}
